package com.park.dao.mapper.order;

import com.park.dao.base.TKMapper;
import com.park.entity.order.MerOrderItem;
import com.park.entity.order.ParkOrderInfo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author Administrator
 * @title: ParkOrderInfoMapper
 * @projectName park
 * @description: 停车 订单mapper
 * @date 2020/5/410:27
 */
@Component
public interface ParkOrderInfoMapper extends TKMapper<ParkOrderInfo> {
    /**
     * 查询正在进行中的订单
     * @param licensePlate
     * @return
     */
    ParkOrderInfo getIngPlate(@Param("licensePlate") String licensePlate);

    /**
     * 查询最近一笔订单
     * @param licensePlate
     */
    ParkOrderInfo getOrderByUserLicense(@Param("licensePlate") String licensePlate);

    /**
     * 订单管理列表
     * @param parkIds
     * @return
     */
    List<MerOrderItem> getOrderList(@Param("parkIds") List<Integer> parkIds);

    /**
     * 支付管理列表
     * @param parkIds
     * @return
     */
    List<MerOrderItem> getPayList(@Param("parkIds") List<Integer> parkIds);


    /**
     * 查询我支付的订单
     * @param userId
     * @return
     */
    List<ParkOrderInfo> myOrderList(@Param("userId") Integer userId);

    //根据订单号查询订单
    ParkOrderInfo getOrerByOrderNo(@Param("orderNo") String orderNo);
}
